import request from '@/utils/request'

// 添加父类
export function addParent(query) {
  return request({
    url: '/system/material/addParent',
    method: 'get',
    params: query
  })
}
// 添加子类
export function addSon(query) {
  return request({
    url: '/system/material/addSon',
    method: 'post',
    data: query
  })
}
export function list(query) {
  return request({
    url: '/system/material/list',
    method: 'post',
    data: query
  })
}
export function deleteById(query) {
  return request({
    url: '/system/material/delete',
    method: 'delete',
    params: query
  })
}
export function updateName(query) {
  return request({
    url: '/system/material/update',
    method: 'put',
    data: query
  })
}
export function materialList(query) {
  return request({
    url: '/system/material/materialList',
    method: 'post',
    data: query
  })
}
export function materialType(query) {
  return request({
    url: '/system/material/type',
    method: 'post',
    data: query
  })
}
export function grandparent(query) {
  return request({
    url: '/system/material/grandparent',
    method: 'get',
    data: query
  })
}
export function parent(query) {
  return request({
    url: '/system/material/parent',
    method: 'get',
    params: query
  })
}
export function search(query) {
  return request({
    url: '/system/material/search',
    method: 'post',
    data: query
  })
}
export function myList(query) {
  return request({
    url: '/system/material/my/list',
    method: 'post',
    data: query
  })
}
export function addMaterial(query) {
  return request({
    url: 'system/material/addMaterial',
    method: 'post',
    data: query
  })
}
export function materialDetials(params) {
  return request({
    url: '/system/material/' + params,
    method: 'get',
  })
}
